package cn.webrx.bs.service;

import cn.webrx.bs.db.DruidUtil;
import cn.webrx.bs.entity.Book;
import org.apache.commons.dbutils.QueryRunner;

import java.util.List;

/**
 * <p>功能描述: </p>
 *
 * @author webrx
 * @version 1.0
 * @date 2020-08-31 17:51
 */
public interface BookDao {
    public QueryRunner run = new QueryRunner(DruidUtil.getDataSource());
    public int add(Book book);
    public List<Book> queryAll();
    public List<Book> show();
    public List<Book> queryByParentId(int id);
    public List<Book> queryAllByCateId(int id);
    public List<Book> searchByName(String name,int currpage,int pagesize);
    public Book queryById(int id);
    public long count();
    public long count(String w);
}
